package com.hassean.we.admin.service.impl;

import com.hassean.we.admin.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;


/**
 * Created by yajun on 2019/6/21.
 */
@Service
public class RedisServiceImpl implements RedisService {
    @Autowired
    private RedisTemplate<Object,Object> redisTemplate;

    public String getTokenRedisMath(){
//        RedisSerializer redisSerializer = new StringRedisSerializer();
//        redisTemplate.setKeySerializer(redisSerializer);
        String token =   redisTemplate.opsForValue().get("token").toString();//查询缓存
        return token;
    }
}
